import Mock from 'mockjs'

const goodsImg = [
  '/imgs/1.jpeg',
  '/imgs/goods_1.png',
  '/imgs/goods_2.jpeg',
  '/imgs/goods_3.png',
  '/imgs/goods_4.jpeg',
  '/imgs/goods_6.jpeg',
  '/imgs/goods_7.png',
  '/imgs/goods_8.png'
]

const bannerImg = [
  '/imgs/banner_1.jpeg',
  '/imgs/banner_2.jpeg',
  '/imgs/b-5.gif',
  '/imgs/b-6.gif',
]

const dmall_list = Mock.mock({
  'list|20': [
    {
      'id': '@id',
      'imgs|+1': goodsImg,
      'banner|+1': bannerImg,
      'count': 0,
      'price': '@integer(1, 100)',
      'isCart': false,
      'isCheck': false
    }
  ]
})

Mock.mock('/api/cart', dmall_list.list);


console.log(dmall_list, 'dmall_list')